package com.bsj.pay.config;

import org.springframework.http.ResponseEntity;

import java.util.Map;

/**
 * <p>
 * RestTemplate 的封装
 * </p>
 *
 * @author chhuean
 * @since 2022-08-14
 */
public interface AppTemplate {
    String post(String url, Map<String, Object> data, Map<String, String> header);

    String post(String url, Map<String, Object> data, Map<String, String> header, Map<String, Object> query);

    String postForm(String url, Map<String, Object> data, Map<String, String> header);

    String postForm(String url, Map<String, Object> data, Map<String, String> header, Map<String, Object> query);

    String get(String url, Map<String, Object> query, Map<String, String> header);

    ResponseEntity<String> postRes(String url, Map<String, Object> data, Map<String, String> header);

    ResponseEntity<String> postRes(String url, Map<String, Object> data, Map<String, String> header, Map<String, Object> query);

    ResponseEntity<String> postFormRes(String url, Map<String, Object> data, Map<String, String> header);

    ResponseEntity<String> postFormRes(String url, Map<String, Object> data, Map<String, String> header, Map<String, Object> query);

    ResponseEntity<String> getRes(String url, Map<String, Object> query, Map<String, String> header);
}
